<template>
	<view>

		<swiper @change="swiperChange" :current="PageCur" class="pages">
			<swiper-item item-id="0">
				<home></home>
			</swiper-item>
			<swiper-item item-id="1">
				<list></list>
			</swiper-item>
			<swiper-item item-id="2">
				<admin></admin>
			</swiper-item>
		</swiper>

		<view class="cu-bar tabbar bg-white shadow foot">

			<view class="action" @click="NavChange" data-cur="0">
				<view class='cuIcon-cu-image'>
					<image :src="'/static/tabbar/home' + [PageCur=='0'?'_cur':''] + '.png'"></image>
				</view>
				<view :class="PageCur=='0'?'text-blue':'text-gray'">首页</view>
			</view>

			<view class="action" @click="NavChange" data-cur="1">
				<view class='cuIcon-cu-image'>
					<image :src="'/static/tabbar/list' + [PageCur == '1'?'_cur':''] + '.png'"></image>
				</view>
				<view :class="PageCur=='1'?'text-blue':'text-gray'">列表</view>
			</view>

			<view class="action" @click="NavChange" data-cur="2">
				<view class='cuIcon-cu-image'>
					<image :src="'/static/tabbar/admin' + [PageCur == '2'?'_cur':''] + '.png'"></image>
				</view>
				<view :class="PageCur=='2'?'text-blue':'text-gray'">个人中心</view>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				PageCur: 0,
			}
		},
		methods: {
			NavChange(e) {
				this.PageCur = e.currentTarget.dataset.cur
			},
			swiperChange(e) {
				this.PageCur = e.detail.current
			}
		}
	}
</script>

<style>

</style>
